package com.zjx.shop.ware.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zjx.shop.common.utils.PageParams;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zjx.shop.common.utils.PageUtils;
import com.zjx.shop.ware.dao.WareOrderTaskDao;
import com.zjx.shop.ware.entity.WareOrderTaskEntity;
import com.zjx.shop.ware.service.WareOrderTaskService;
import org.springframework.util.StringUtils;


@Service("wareOrderTaskService")
public class WareOrderTaskServiceImpl extends ServiceImpl<WareOrderTaskDao, WareOrderTaskEntity> implements WareOrderTaskService {

    @Override
    public PageUtils queryPage(PageParams params) {
        QueryWrapper<WareOrderTaskEntity> wrapper =new QueryWrapper<>();

        if (!StringUtils.isEmpty(params.getKey())){

        }
        IPage<WareOrderTaskEntity> page = this.page(
                new Page<>(params.getPage(),params.getSize()),
                wrapper
        );

        return new PageUtils(page.getCurrent(),page.getSize(),(long) page.getRecords().size(),page.getRecords());
    }

}